/*
 *                 Sun Public License Notice
 * 
 * The contents of this file are subject to the Sun Public License
 * Version 1.0 (the "License"). You may not use this file except in
 * compliance with the License. A copy of the License is available at
 * http://www.sun.com/
 * 
 * The Original Code is NetBeans. The Initial Developer of the Original
 * Code is Sun Microsystems, Inc. Portions Copyright 1997-2000 Sun
 * Microsystems, Inc. All Rights Reserved.
 */

package org.medbeans.modules.pdf;

import java.io.File;

import org.openide.options.SystemOption;
import org.openide.util.HelpCtx;
import org.openide.util.NbBundle;

/** PDF viewing options.
 * @author Jesse Glick
 */
public class PDFSettings extends SystemOption {

    public static final String PROP_PDF_VIEWER = "PDFViewer"; // NOI18N

    private static final long serialVersionUID = -4792208769849769376L;
    
    protected void initialize () {
        setPDFViewer (new File ("acroread")); // NOI18N
    }

    public String displayName () {
        return NbBundle.getMessage (PDFSettings.class, "LBL_settings");
    }

    public HelpCtx getHelpCtx () {
        return new HelpCtx (PDFSettings.class);
    }

    public static PDFSettings getDefault () {
        return (PDFSettings) findObject (PDFSettings.class, true);
    }

    public File getPDFViewer () {
        return (File) getProperty (PROP_PDF_VIEWER);
    }

    public void setPDFViewer (File viewer) {
        putProperty (PROP_PDF_VIEWER, viewer, true);
    }

}
